package com.igrowing.springbootinit.biMQ;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Description:    // 类说明
 *
 * @ClassName: biProduce    // 类名，会自动填充
 * @Author: 周天赐        // 创建者
 * @Email: m18879004515@163.com
 * @Date: 2024/4/2 17:21   // 时间
 * @Version: 1.0     // 版本
 */
@Component
public class BiProducer {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void sendMessage( String message)
    {
        rabbitTemplate.convertAndSend(BiMqConstant.BI_EXCHANGE_NAME, BiMqConstant.BI_ROUTING_KEY, message);
    }

}

    
    
